const HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require("path");
const AutoUploadWebpackPlugin = require("./plugins/AutoUploadWebpackPlugin");
const { PASSWORD } = require("./plugins/config");

module.exports = {
  mode: "production",
  entry: "./src/main.js",
  output: {
    path: path.resolve(__dirname, "./dist"),
    filename: "bundle.js",
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: "./index.html",
    }),
    new AutoUploadWebpackPlugin({
      host: "123.207.32.32",
      username: "root",
      password: PASSWORD,
      remotePath: "/root/test",
    }),
  ],
};
